{% extends 'blog/base.html' %}
{% block css %}
    <link rel="stylesheet" href="/static/css/car.css">
    <script type="text/javascript" src="static/js/jquery.js"></script>
    <script type="text/javascript" src="static/js/car.js" ></script>
{% endblock %}

{% block showActive2%}
back-heigh
{% endblock %}

{% block content %}
    <div class="contain">
        <div class="title">
            <div class="text">
                购物清单
            </div>
        </div>
        <table>
            <tr>
                <th>分类</th>
                <th>名称</th>
                <th>单价(元)</th>
                <th>单位</th>
                <th>数量</th>
                <th>小计</th>
            </tr>
            {% for post in postss %}
                <tr>
                    <td> {{ post.sort}}</td>
                    <td>{{ post.name}}</td>
                    <td>{{ post.price }}</td>
                    <td>{{ post.unit }}</td>
                    <td>
                        <div class="Click">
                            <button class="less" name={{post.id}}>-</button>
                            <input  class="number" value={{post.counts}} readonly="readonly"/>
                            <button class="add" name={{post.id}}>+</button>
                        </div>
                     </td>
                     <td id = {{ post.id }}>{{ post.subtotal }}</td>
                </tr>
            {% endfor %}
        </table>
        <div class="sum"> 总计:{{ total }}元</div>
        <p><a id="button" href="list.html">付款</a></p>
    </div>
{% endblock %}